package com.main.login.domain.user.aggregates;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.main.common.base.base.entity.BaseEntity;
import com.main.common.interfaces.AggregateRoot;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
@AggregateRoot
public class Account extends BaseEntity implements Serializable {
    /**
     * 账户id
     */
    @TableId(value = "id", type= IdType.ASSIGN_UUID)
    private String id;

    /**
     * 账号
     */
    @TableField(value = "name")
    private String number;
    /**
     * 密码
     */
    @TableField(value = "code")
    private String password;
//    /**
//     * 用户id
//     */
//    @TableField(value = "user_id")
//    private UserId userId;

}
